package cn.jilian.admin.tool.domain;

import java.io.Serializable;
import java.util.Map;

import cn.jilian.common.dto.PageInfo;
import cn.jilian.common.dto.SortInfo;

public class PageAndSort  implements Serializable{
	
	public PageAndSort() {
		
	}
	
	public PageAndSort(Map<String,Object> params) {
		Integer start=((Number)params.get("pageInfo.start")).intValue();
		Integer limit=((Number)params.get("pageInfo.limit")).intValue();
		String field=(String) params.get("sortInfo.field");
		String direct=(String) params.get("sortInfo.direct");
		pageInfo=new PageInfo(start,limit,0,0);
		this.sortInfo=new SortInfo();
		this.sortInfo.setField(field);
		this.sortInfo.setDirect(direct);
	}

	
	private PageInfo pageInfo;
	
	private SortInfo sortInfo;

	public PageInfo getPageInfo() {
		return pageInfo;
	}

	public void setPageInfo(PageInfo pageInfo) {
		this.pageInfo = pageInfo;
	}

	public SortInfo getSortInfo() {
		return sortInfo;
	}

	public void setSortInfo(SortInfo sortInfo) {
		this.sortInfo = sortInfo;
	}
	
	
}
